package org.infodavid.common.model.components;

import org.infodavid.common.persistence.IBasicDataObject;

/**
 * The Interface IEMail.
 */

public interface IEMail extends IBasicDataObject {

  /**
   * The Enum EMAIL_TYPE.
   */
  enum EMailType {
    /** The HOME. */
    HOME,
    /** The OFFICE. */
    OFFICE,
    /** The UNDEFINED. */
    UNDEFINED
  }

  /** The EMAIL. */
  String EMAIL = "email";

  /** The VALUE. */
  String VALUE = "value";

  /** The TYPE. */
  String TYPE = "type";

  /** The PATTERN. */
  String PATTERN = "^(\\w+[\\.\\-_&]?\\w+)@(\\w+[\\.\\-_&]?\\w+\\.)*[A-Za-z]{2,4}$";

  /** The constant MAX_LENGTH_VALUE. */
  int MAX_LENGTH_VALUE = 64;

  /**
   * Gets the type.
   * @return the type
   */
  EMailType getType();

  /**
   * Gets the value.
   * @return the value
   */
  String getValue();

  /**
   * Sets the type.
   * @param value the value
   */
  void setType(EMailType value);

  /**
   * Sets the value.
   * @param value the value
   */
  void setValue(String value);
}
